package cn.edu.scau.sec.rw.model.device_manage.Device;

import java.util.ArrayList;
import java.util.List;

public class Equipment {//某台设备
	//名字
	private String name;

	//被谁占用
	private Device_Pcb possessor;

	//是否被占用
	private boolean isOccupy;//1

	public Equipment(String name){
		this.name=name;
		clear();
	}

	//占用这个设备
	public void Occupy(Device_Pcb Occupyer) {
		isOccupy=true;
		possessor=Occupyer;
	}

	//清空进程 释放这个设备
	public void clear() {
		isOccupy=false;
	}


	//get set
	public void setisOccupy(boolean isOccupy0) {
		isOccupy=isOccupy0;
	}
	public boolean getisOccupy() {
		return isOccupy;
	}
	public void setPossessor(Device_Pcb lst) {
		possessor=lst;
	}
	public Device_Pcb getPossessor() {
		return possessor;
	}
	public void setName(String name0) {
		name=name0;
	}
	public String getName() {
		return name;
	}
}
